﻿namespace lcwb.Shared.Service
{
    public class StateService
    {
        private int _currentUserId;
        public int CurrentUserId
        {
            get => _currentUserId;
            set
            {
                if (_currentUserId != value)
                {
                    _currentUserId = value;
                    OnStateChange?.Invoke();
                }
            }
        }

        private string? _currentUserName;
        public string? CurrentUserName
        {
            get => _currentUserName;
            set
            {
                if (_currentUserName != value)
                {
                    _currentUserName = value;
                    OnStateChange?.Invoke();
                }
            }
        }

        public event Action? OnStateChange;
    }
}

